<script lang="ts" setup>
import ProductBox from "../Common/ProductBox.vue";
import { ref } from "vue";
import type { Dayjs } from "dayjs";
type RangeValue = [Dayjs, Dayjs];

const value5 = ref<string>("Option1");
const value1 = ref<RangeValue>();
const value6 = ref<string>("");
const year = ref<Dayjs>();

const dataSource = [
  {
    key: "1",
    no: 2,
    num: 22,
    amount: "100",
    outlay: "-100",
    status: "未支付",
    time: "2020-04-05",
  },
];

const columns = [
  {
    title: "订单编号",
    dataIndex: "no",
    key: "no",
  },
  {
    title: "子订单数量",
    dataIndex: "num",
    key: "num",
  },
  {
    title: "订单金额（元）",
    dataIndex: "amount",
    key: "amount",
  },
  {
    title: "支付金额（元）",
    dataIndex: "outlay",
    key: "outlay",
  },
  {
    title: "下单时间",
    dataIndex: "time",
    key: "time",
  },
  {
    title: "状态",
    dataIndex: "status",
    key: "status",
  },
  {
    title: "操作",
    dataIndex: "operation",
    key: "operation",
  },
];
</script>
<template>
  <div class="pr-5 pl-5">
    <ProductBox title="财务明细">
      <template #default>
        <div class="flex flex-wrap items-center">
          <div class="flex mb-5 w-100">
            <a-input-group compact>
              <div class="flex whitespace-nowrap">
                <a-select v-model:value="value5">
                  <a-select-option value="Option1">订单编号</a-select-option>
                </a-select>
                <a-input v-model:value="value6" style="width: 70%" />
              </div>
            </a-input-group>
          </div>
          <a-date-picker v-model:value="year" picker="year" class="mb-5" />
          <span class="w-5"></span>

          <div class="flex items-center mb-5">
            <a-range-picker v-model:value="value1" />
            <a-button type="text">
              <img src="/console/downloadIcon.png" alt="" class="w-5 h-5" />
            </a-button>
          </div>
        </div>
        <div class="m-5"></div>
        <a-table :scroll="{ x: 1000, }" :dataSource="dataSource" :columns="columns" />
      </template>
    </ProductBox>
  </div>
</template>
<style lang="scss" scoped></style>
